-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PE to implement GetLists
#121
Conversation
Signed-off-by: Shaobo He <shaobohe@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to have GetLists
restored, as an action.
Signed-off-by: Shaobo He <shaobohe@amazon.com>
Signed-off-by: Shaobo He <shaobohe@amazon.com>
Signed-off-by: Shaobo He <shaobohe@amazon.com>
let partial_response = | ||
self.authorizer | ||
.is_authorized_partial(&partial_request, &self.policies, &entities); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment explain what's going on here, because readers might be confused.
What we are trying to simulate is the following:
- For all entities L of type List,
is_authorized(principal,GET_LIST,
L)
? If so, add to collection
What we are doing here instead is
- Let res =
is_authorized_partial(principal,GET_LIST,
unknown)
. - For all entities L of type List, is res
.reauthorize(
unknown=
L)
? If so, add to collection
The benefit is that we are partially evaluating some of the policies so the reauthorization requires less work. Even more, we imagine that a future implementation of the entity store can implement the reauthorize
logic more directly/efficiently, e.g., as a DB query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. Will fix it in another PR.
Issue #, if available:
Description of changes: